package com.xiyuan.smartutils.template.engine.expression.symbol;

/**
 * 或运算符，竖杠符号原型(||)
 * 
 * @version v1.0.0 @author lgz 2020年10月31日 新建与整理
 */
public class _Vertical extends Symbol
{
    private static final long serialVersionUID = 1L;
    public _Vertical(String path, int line, int column)
    {
        super(path, line, column);
    }
    
    private int type = SYMBOL_VERTICAL;
    
    public void setDouble(boolean isDouble)
    {
        this.type = isDouble ? SYMBOL_VERTICAL_2 : SYMBOL_VERTICAL;
    }
    
    @Override
    public int getType()
    {
        return SYMBOL_VERTICAL;
    }
    
    @Override
    public String toString()
    {
        return type == SYMBOL_VERTICAL_2 ? " || " : " | ";
    }
    
}
